import request from '@/utils/request'

/**
 * 用户注册
 */
export function register(data) {
  return request.post('/auth/register', data)
}

/**
 * 用户登录
 */
export function login(data) {
  return request.post('/auth/login', data)
}

/**
 * 退出登录
 */
export function logout() {
  return request.post('/auth/logout')
}

/**
 * 刷新Token
 */
export function refreshToken() {
  return request.post('/auth/refresh')
}

/**
 * 发送短信验证码
 */
export function sendSmsCode(data) {
  return request.post('/auth/sms-send', data)
}

/**
 * 修改密码
 */
export function changePassword(data) {
  return request.post('/auth/change-password', data)
}

/**
 * 忘记密码
 */
export function forgotPassword(data) {
  return request.post('/auth/forgot-password', data)
} 